﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Configuration;

namespace PeoplePickerPlus.Helpers
{
    internal class Configuration
    {
        public const string UserImageCacheTimeSetting = "UserImageCacheTime";
        public const string PeoplePickerExcludedPagesSetting = "PeoplePickerExcludedPages";
        public const string PeoplePickerShowSecurityGroupMembers = "PeoplePickerShowSecurityGroupMembers";

        public static string GetAppSetting(string settingName, string defaultValue)
        {
            string settingValue = WebConfigurationManager.AppSettings[settingName];

            //get from SPList if not in web.config
            if (string.IsNullOrEmpty(settingValue))
            {
                return defaultValue;
            }

            return settingValue;
        }
    }
}
